<?php


namespace app\common\validates;


use think\Validate;

class Dummy extends Validate
{
    protected $rule =   [
        'name|名称'   => 'require|min:3|max:200',
        'sex|性别'    => 'require|in:0,1',
        'avatar|头像' => 'require|url',
        'age|年龄' => 'require|integer|min:0|max:150',
        'birthday|生日' => 'require|dateFormat:Y-m-d',
        'height|身高' => 'require|integer|min:0|max:5000',
        'weight|体重' => 'require|integer|min:0|max:5000',
        'horoscope|星座' => 'require',
        'labels|标签' => 'require|array',
    ];

    protected $scene = [
        'store' => ['name', 'sex', 'avatar', 'age', 'birthday', 'height', 'weight', 'horoscope', 'labels'],
        'update' => ['name', 'sex', 'avatar', 'age', 'birthday', 'height', 'weight', 'horoscope', 'labels'],
    ];
}
